<template>
    <div class="homeIndex">
        <nav-tab :data='navData' :index='tabIndex'/>
        <router-view/>
    </div>
</template>

<script>
import navTab from '@/components/navTab'
export default {
    components:{navTab},
    data(){
        return{
            navData:[{
                name:'客户',
                path:'/customer',
                logo:'fa-user'
            },{
                name:'客户公海',
                path:'/customer/sea',
                logo:'fa-group'
            },{
                name:'客户联系人',
                path:'/customer/linkman',
                logo:'fa-phone-square'
            },],
            tabIndex:0
        }
    },
    created(){
        let index = this.$route.path.split('/')[2];
        switch(index){
            case '':
            this.tabIndex = 0;
            break
            case 'sea':
            this.tabIndex = 1;
            break
            case 'linkman':
            this.tabIndex = 2;
            break
        }
    }
}
</script>

<style lang='scss'>

</style>
